<!DOCTYPE html>
<html lang="en">
<head>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <my-component></my-component>
    </div>
    <script>
        var com1 = {
            template:'<p>我是vm实例中的局部组件</p>'
        }
        var vm = new Vue({
            el:'#app',
            components : {
                myComponent : com1
            }       
        })
    </script>
</body>
</html>